]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
MessageTray: fix closing the right click menu
authorGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 21 Nov 2012 00:29:45 +0000 (01:29 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 21 Nov 2012 11:29:43 +0000 (12:29 +0100)
We were trying to disconnect a signal we never added.

https://bugzilla.gnome.org/show_bug.cgi?id=688771

js/ui/messageTray.js

index 31283e690e2c004c6a49aed86fd3187c857aff8c..266759b95e64d64fa625a9a74f269ba8b7d421dd 100644 (file)
@@ -2493,6 +2493,7 @@ const MessageTray = new Lang.Class({
             this._summaryBoxPointerItem.prepareNotificationStackForShowing();
         } else if (this._clickedSummaryItemMouseButton == 3) {
             this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
+            this._summaryBoxPointerCloseClickedId = 0;
         }
 
         this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
@@ -2599,8 +2600,10 @@ const MessageTray = new Lang.Class({
         this._summaryBoxPointer.bin.child = null;
         this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
         this._summaryBoxPointerContentUpdatedId = 0;
-        this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
-        this._summaryBoxPointerCloseClickedId = 0;
+        if (this._summaryBoxPointerCloseClickedId != 0) {
+            this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
+            this._summaryBoxPointerCloseClickedId = 0;
+        }
         this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
         this._summaryBoxPointerDoneDisplayingId = 0;